home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
shape.lha
/
shape
/
myshape.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
610b
|
25 lines
include "myshape.h"
yshape::myshape(point a, point b) : (a,b)
int ll = neast().x - swest().x + 1;
int hh = neast().y - swest().y + 1;
l_eye = new line(point(swest().x + 2, swest().y + hh * 3 / 4) , 2);
r_eye = new line(point(swest().x + ll - 4, swest().y + hh * 3 / 4), 2);
mouth = new line(point(swest().x + 2, swest().y + hh / 4) , ll - 4);
oid myshape:: draw()
rectangle::draw();
put_point(point((swest().x + neast().x) / 2, (swest().y + neast().y) / 2));
oid myshape:: move(int a, int b)
rectangle::move(a,b);
l_eye->move(a,b);
r_eye->move(a,b);
mouth->move(a,b);